<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <title>Title</title>
</head>
<body>

<script src="../js/vue.js"></script>
<div id="app">
<!--  数组中类名如果有引号代表就是一个字符串类名，没有引号就是一个变量-->
<!--  <h2 class="title" :class="['active','line']">{{message}}</h2>-->
<!--  <h2 class="title" :class="[active,line]">{{message}}</h2>-->
  <h2 class="title" :class="getClasses()">{{message}}</h2>
</div>

<script>
  const app = new Vue({
    el: '#app',
    data: {
      message: "第一次，系统的学VUE",
      active: "isActive",
      line: "isLine"
    },
    methods:{
      getClasses: function (){
        return [this.active,this.line]
      }
    }
  })
</script>

</body>
</html>